<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
</head>

<body>
<?php
/* 招聘信息删除处理页 */
require_once("../../conn/conn_db.php");   //包含数据库连接文件
if( $_GET["r_id"]!= ""  &&  $_GET["Type"]!= "")
{
    $rid = $_GET["r_id"];         //获取传递的新闻编号
    $type = $_GET["Type"];         //获取传递的操作类型
    $sql ="";
    switch ($type)
    {
        case "1":
            $sql = "update recruit_info set r_status=1 where r_id=".$rid;  //更新语句
            break;
        case "2":
            $sql = "update recruit_info set r_status=2 where r_id=".$rid;  //更新语句
            break;
        case "3":
            $sql = "delete from recruit_info where r_id=".$rid;  //删除语句
            break;
    }
    $i = $conn->query($sql);  //执行SQL语句
    if($i)                   //判断执行结果
    {
        echo "<script>alert('操作成功！');self.location='../recruit_manager.php'</script>";
    }
    else
    {
        echo "<script>alert('操作失败！');self.location='../recruit_manager.php'</script>";
    }
}
else
{
    echo "<script>alert('请选择要操作的招聘信息！');self.location='../recruit_manager.php'</script>";
}
?>
</body>
</html>